package com.nexus.core.exception;

import lombok.Data;

/**
 * 消息队列异常
 *
 * @Date 2025/7/25 16:50
 * @Author luzhengning
 **/
@Data
public class AmqpQueueException extends BaseException {

    private String messageId;
    private String exchange;
    private String routingKey;

    /**
     * 默认错误码
     *
     * @Date 2025/7/30 16:57
     * @Author luzhengning
     **/
    private static final int DEFAULT_ERROR_CODE = 500;

    public AmqpQueueException() {
        super(DEFAULT_ERROR_CODE);
    }

    public AmqpQueueException(String message, Object... data) {
        super(DEFAULT_ERROR_CODE, message, data);
    }

    public AmqpQueueException(String message, Throwable cause) {
        super(message, cause);
    }

    public AmqpQueueException(String message, String messageId, String exchange, String routingKey) {
        super(message);
        this.messageId = messageId;
        this.exchange = exchange;
        this.routingKey = routingKey;
    }

}
